package com.ushine.design.design.b_structural_type.d_decorator.a_practice;

/**
 * 抽象装饰类
 *
 * @author yls
 */
public class Decorator extends Component {

    //维持一个对抽象对象构件的引用
    private Component component;

    //注入一个抽象构件类型的对象
    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        component.operation();
    }

}
